package com.han.bloghan.controller.api;

import com.han.bloghan.common.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping(value = "/v1/user")
@Api(tags = "用户相关api")
public class UserController {



    @PostMapping(value = "/login")
    @ApiOperation(value = "用户登录")
    public CommonResult login(){
        return CommonResult.success("ok");
    }

    @GetMapping(value = "/login_out")
    @ApiOperation(value = "用户登出")
    public CommonResult loginOut(){
        return CommonResult.success("ok");
    }


    @GetMapping(value = "/current")
    @ApiOperation(value = "当前用户")
    public CommonResult currentUser(){
        return CommonResult.success("ok");
    }

    @PutMapping(value = "/")
    @ApiOperation(value = "大幅修改用户信息")
    public CommonResult update(){
        return CommonResult.success("ok");
    }

    @PatchMapping(value = "/")
    @ApiOperation(value = "更新部分信息")
    public CommonResult patch(){
        return CommonResult.success("ok");
    }

    @DeleteMapping(value = "/{userid}")
    @ApiOperation(value = "用户注销账号")
    public CommonResult delete(@PathVariable(value = "userid") Integer userId) {
        return CommonResult.success("ok");
    }

    @GetMapping(value = "/info")
    @ApiOperation(value = "展示用户信息")
    public CommonResult info(){
        return CommonResult.success("ok");
    }

    @GetMapping(value = "/part_info")
    @ApiOperation(value = "获取部分信息，ID和名字")
    public CommonResult partInfo(){
        return CommonResult.success("ok");
    }



}
